-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WORK IN PROGRESS - Install for all users #55
base: master
Are you sure you want to change the base?
WORK IN PROGRESS - Install for all users #55
Conversation
@ddomingos-encora Would you be able to take a look at this, and see if you can spot what I'm doing wrong? :) |
It seems it is all good. I'll try to test it once I restore my system (probably tomorrow). I'll let you know |
72e76c3
to
1bcc21b
Compare
@GurliGebis In the other discussion, you mentioned this: "The Get-AppxPackage cmdlet shows it as installed, but it isn't registered". What field tells you it is not registered? I did not find such field. Also, do you see any difference in the output of the Get-AppxPackage command when you install the official Notepad++ package and when you install the package generated by the code in this PR? |
@ddomingos-encora if you run that command, and it shows up in the list, it is installed 🙂 |
@ddomingos-encora could it be an ACL issue? (Just thinking aloud) |
1bcc21b
to
9183923
Compare
Hi @GurliGebis I managed to restore my system and test today. It "works" but requires a restart or sign off/sing in. Since the installation of notepad++ does not require a restart, it is probably not a final solution. Still, you might want to keep both this logic and the ensure registration logic, since the ensure registration logic also has a blind spot of not displaying the menu the first time when that code is executed (if was not installed before), so the chance of that happening for other users is reduced. At least the remove for all users flag I think you should keep. If you want to keep the provisioning code as well, I'd use both staging/provisioning and add code, so that it gets installed for the user running the installer. |
I totally agree @ddomingos-encora 🙂 |
37f43ac
to
2763e04
Compare
@ddomingos-encora There is a problem - it works fine for the first user now. |
Yes, I thought about this later yesterday, after I posted. I was wondering if there could be a difference between finding the package for all users or the current user but I just saw you already implemented this way. The only thing I can think of now would be the Package class itself: |
Please do. |
Look at this explanation here: |
I did a few more tests but could not find an attribute that could help us to differentiate that situation, nor even establish when the package gets installed to other users. Sometimes it seems to require a restart, sometimes it doesn't get installed at all. It seems just buggy to me. Unfortunately, I gave up. I think we should change the title of the PR to uninstall to all users and keep only the RemoveForAllUsers flag. Regards |
@GurliGebis I was doing some tests and for a moment I thought that the RemoveForAllUsers flag was not working but it is. I think this is a good improvement we can take out of all these attempts. Regards |
@ddomingos-encora I think so as well. |
2763e04
to
5e410dd
Compare
Changes for installing for all users